package com.reebake.ideal.infra.controller;

import cn.hutool.core.bean.BeanUtil;
import com.reebake.ideal.infra.service.ContentClobService;
import com.reebake.ideal.infra.vo.ContentClobVO;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("content/clob")
@RequiredArgsConstructor
public class ContentClobPlusController {
    private final ContentClobService contentClobService;

    @GetMapping("query-by-id/{contentClobId}")
    public ContentClobVO queryById(@PathVariable String contentClobId){
        return BeanUtil.copyProperties(contentClobService.getById(contentClobId), ContentClobVO.class);
    }
}
